package com.retrofit.server.processor.entity;

import com.okhttp.annotations.ApiResponseHandler;
import javax.lang.model.type.TypeMirror;

/**
 * @author GYL
 * @dateTime 2020/5/9-10:37
 * @description 方法注解类
 */
public class MethodAnnotationEntity {
  /**
   * 方法注解 class
   * @see ApiResponseHandler#handler()
   */
  private TypeMirror apiResponseHandler;

  private HandlerTypeEnum handlerType;
  
  /**
   * 方法注解泛型 class
   * @see ApiResponseHandler#genericity()
   */
  private TypeMirror apiGenericity;
  
  /**
   * 方法注解：是否生成对应实现方法
   * @see ApiResponseHandler#isGenerate()
   */
  private boolean isGenerate=true;
  
  /**
   * 方法注解：是否为同步方法
   * @see ApiResponseHandler#isSync()
   */
  private boolean isSync=false;
  
  public TypeMirror getApiResponseHandler() {
    return apiResponseHandler;
  }
  
  public void setApiResponseHandler(TypeMirror apiResponseHandler) {
    this.apiResponseHandler = apiResponseHandler;
  }
  
  public TypeMirror getApiGenericity() {
    return apiGenericity;
  }
  
  public void setApiGenericity(TypeMirror apiGenericity) {
    this.apiGenericity = apiGenericity;
  }
  
  public boolean isGenerate() {
    return isGenerate;
  }
  
  public void setGenerate(boolean generate) {
    isGenerate = generate;
  }
  
  public boolean isSync() {
    return isSync;
  }
  
  public void setSync(boolean sync) {
    isSync = sync;
  }

  public HandlerTypeEnum getHandlerType() {
    return handlerType;
  }

  public void setHandlerType(
      HandlerTypeEnum handlerType) {
    this.handlerType = handlerType;
  }

}
